// 导入二次封装axios
import koi from "@/utils/axios.ts";

// 统一管理接口
enum API {
    gl_wxApplet = '/wxApplet'
}

// 微信小程序信息列表
export const getWxAppletList = (params: { page: any, pageSize: any, name?: any }) => koi.get(`${API.gl_wxApplet}/list`, params)

// 删除小程序信息
export const deleteWxApplet = (id: any) => koi.delete(`${API.gl_wxApplet}/${id}`)

// 新增小程序
export const addWxApplet = (data: { name: any, appid: any, secret: any }) => koi.post(API.gl_wxApplet, data)

// 修改小程序
export const updateWxApplet = (id: any, data: { name: any, appid: any, secret: any }) => koi.put(`${API.gl_wxApplet}/${id}`, data)